package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 请假申请对象 leave_applications
 *
 * @author ruoyi
 * @date 2025-03-30
 */
public class LeaveApplications extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 申请ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 审批人ID */
    @Excel(name = "审批人ID")
    private Long approverId;

    /** 请假类型 */
    @Excel(name = "请假类型")
    private String leaveType;

    /** 请假开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "请假开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 请假结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "请假结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /* *//** 请假天数 *//*
    @Excel(name = "请假天数")
    private Long leaveDays;*/

    /** 请假原因 */
    @Excel(name = "请假原因")
    private String reason;

    /** 审批状态 */
    @Excel(name = "审批状态")
    private String status;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /** 审批原因 */
    @Excel(name = "审批原因")
    private String result;

    /** 审批人姓名（新增字段） */
    @Excel(name = "审批人姓名")
    private String approverName;

    // Getter和Setter
    public String getApproverName() {
        return approverName;
    }

    public void setApproverName(String approverName) {
        this.approverName = approverName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setApproverId(Long approverId)
    {
        this.approverId = approverId;
    }

    public Long getApproverId()
    {
        return approverId;
    }

    public void setLeaveType(String leaveType)
    {
        this.leaveType = leaveType;
    }

    public String getLeaveType()
    {
        return leaveType;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

   /* public void setLeaveDays(Long leaveDays)
    {
        this.leaveDays = leaveDays;
    }*/

   /* public Long getLeaveDays()
    {
        return leaveDays;
    }*/

    public void setReason(String reason)
    {
        this.reason = reason;
    }

    public String getReason()
    {
        return reason;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setApprovalTime(Date approvalTime)
    {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime()
    {
        return approvalTime;
    }

    public void setCreatedTime(Date createdTime)
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime()
    {
        return createdTime;
    }

    public void setUpdatedTime(Date updatedTime)
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime()
    {
        return updatedTime;
    }

    public void setResult(String result)
    {
        this.result = result;
    }

    public String getResult()
    {
        return result;
    }
    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("approverId", getApproverId())
                .append("leaveType", getLeaveType())
                .append("startDate", getStartDate())
                .append("endDate", getEndDate())
                /*.append("leaveDays", getLeaveDays())*/
                .append("reason", getReason())
                .append("status", getStatus())
                .append("approvalTime", getApprovalTime())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .append("result", getResult())
                .append("userName", getUserName())
                .toString();
    }
}
